import request from '@/utils/request'
import { ELECTRIC, GAS, WATER } from '@/config'

const baseURL = '/energyDataManagement'

// 能源数据-各月度电数据
export function loadMonthElectricityList () {
  // return request({
  //   url: `${baseURL}/loadMonthElectricityList`
  // })
  return request({
    url: `${baseURL}/loadMonthList`,
    params: {
      type: ELECTRIC
    }
  })
}

// 能源数据-各月度水数据
export function loadMonthWaterList () {
  // return request({
  //   url: `${baseURL}/loadMonthWaterList`
  // })
  return request({
    url: `${baseURL}/loadMonthList`,
    params: {
      type: WATER
    }
  })
}

// 能源数据-各月度气数据
export function loadMonthGasList () {
  // return request({
  //   url: `${baseURL}/loadMonthGasList`
  // })
  return request({
    url: `${baseURL}/loadMonthList`,
    params: {
      type: GAS
    }
  })
}

// 本月电力数据企业排名
export function loadMonthElectricityEnterpriseRanking () {
  return request({
    url: `${baseURL}/loadMonthElectricityEnterpriseRanking`
  })
}
// 本月水数据企业排名
export function loadMonthWaterEnterpriseRanking () {
  return request({
    url: `${baseURL}/loadMonthWaterEnterpriseRanking`
  })
}
// 本月气数据企业排名
export function loadMonthGasEnterpriseRanking () {
  return request({
    url: `${baseURL}/loadMonthGasEnterpriseRanking`
  })
}
// 每月电力日数据折线图
export function loadDayElectricityList () {
  // return request({
  //   url: `${baseURL}/loadDayElectricityList`
  // })
  return request({
    url: `${baseURL}/loadDayList`,
    params: {
      type: ELECTRIC
    }
  })
}
// 每月水日数据折线图
export function loadDayWaterList () {
  // return request({
  //   url: `${baseURL}/loadDayWaterList`
  // })
  return request({
    url: `${baseURL}/loadDayList`,
    params: {
      type: WATER
    }
  })
}
// 每月气日数据折线图
export function loadDayGasList () {
  // return request({
  //   url: `${baseURL}/loadDayGasList`
  // })

  return request({
    url: `${baseURL}/loadDayList`,
    params: {
      type: GAS
    }
  })
}
// 本年电力数据柱状图
export function loadYearElectricityList () {
  // return request({
  //   url: `${baseURL}/loadYearElectricityList`
  // })

  return request({
    url: `${baseURL}/loadYearList`,
    params: {
      type: ELECTRIC
    }
  })
}
// 本年水数据柱状图
export function loadYearWaterList () {
  // return request({
  //   url: `${baseURL}/loadYearWaterList`
  // })
  return request({
    url: `${baseURL}/loadYearList`,
    params: {
      type: WATER
    }
  })
}
// 本年气数据柱状图
export function loadYearGasList () {
  // return request({
  //   url: `${baseURL}/loadYearGasList`
  // })
  return request({
    url: `${baseURL}/loadYearList`,
    params: {
      type: GAS
    }
  })
}
// 当日某能耗最高3家企业占比
export function selectDayConsumeTopThree (type) {
  return request({
    url: `${baseURL}/selectDayConsumeTopThree`,
    params: {
      type
    }
  })
}
// 当日某能耗行业占比
export function selectDayIndustryNumber (type) {
  return request({
    url: `${baseURL}/selectDayIndustryNumber`,
    params: {
      type
    }
  })
}
// 当月某能耗最高3家企业占比
export function selectMonthConsumeTopThree (type) {
  return request({
    url: `${baseURL}/selectMonthConsumeTopThree`,
    params: {
      type
    }
  })
}
// 当月某能耗行业占比
export function selectMonthIndustryNumber (type) {
  return request({
    url: `${baseURL}/selectMonthIndustryNumber`,
    params: {
      type
    }
  })
}
// 本年某能耗最高3家企业占比
export function selectYearConsumeTopThree (type) {
  return request({
    url: `${baseURL}/selectYearConsumeTopThree`,
    params: {
      type
    }
  })
}
// 本年某能耗行业占比
export function selectYearIndustryNumber (type) {
  return request({
    url: `${baseURL}/selectYearIndustryNumber`,
    params: {
      type
    }
  })
}
// 查询综合能耗最高的Top企业
export function loadLastMonthEnergyConsumptionEnterpriseTop () {
  return request({
    url: `${baseURL}/loadLastMonthEnergyConsumptionEnterpriseTop`
  })
}
// 查询上月占比上上月综合能耗
export function loadLastMonthAndOmaeMonthComprehensiveProportion (type) {
  return request({
    url: `${baseURL}/loadLastMonthAndOmaeMonthComprehensiveProportion`,
    params: {
      type
    }
  })
}
// 查询上月和上上月全市综合消耗量以及上月占上上月全市综合消耗量多少
export function loadLastMonthAndOmaeMonthCityComprehensiveConsumption () {
  return request({
    url: `${baseURL}/loadLastMonthAndOmaeMonthCityComprehensiveConsumption`
  })
}
// 查询能源占比综合能耗
export function loadEnergyProportionComprehensiveEnergyConsumption () {
  return request({
    url: `${baseURL}/loadEnergyProportionComprehensiveEnergyConsumption`
  })
}
// 查询能源环比
export function loadEnergyMonthOnMonthRatio (type) {
  return request({
    url: `${baseURL}/loadEnergyMonthOnMonthRatio`,
    params: {
      type
    }
  })
}
// 查询能源同比
export function loadEnergyYearOverYear (type) {
  return request({
    url: `${baseURL}/loadEnergyYearOverYear`,
    params: {
      type
    }
  })
}
// 查询能源消耗量最高的企业TOP
export function loadLastMonthEnergyConsumptionTop (type) {
  return request({
    url: `${baseURL}/loadLastMonthEnergyConsumptionTop`,
    params: {
      type
    }
  })
}

// 查询本年每月的日综合能耗数据
export function loadDayComprehensiveEnergyConsumptionList () {
  return request({
    url: `${baseURL}/loadDayComprehensiveEnergyConsumptionList`
  })
}

// 查询本年每月的综合能耗数据
export function loadMonthComprehensiveEnergyConsumptionList () {
  return request({
    url: `${baseURL}/loadMonthComprehensiveEnergyConsumptionList`
  })
}

// 查询本年的综合能耗数据
export function loadYearComprehensiveEnergyConsumptionList () {
  return request({
    url: `${baseURL}/loadYearComprehensiveEnergyConsumptionList`
  })
}

// 昨日综合能耗最高5家企业占比
export function selectDayComprehensiveEnergyConsumptionTopFive () {
  return request({
    url: `${baseURL}/selectDayComprehensiveEnergyConsumptionTopFive`
  })
}

// 上月综合能耗最高5家企业占比
export function selectMonthComprehensiveEnergyConsumptionTopFive () {
  return request({
    url: `${baseURL}/selectMonthComprehensiveEnergyConsumptionTopFive`
  })
}

// 本年综合能耗最高5家企业占比
export function selectYearComprehensiveEnergyConsumptionTopFive () {
  return request({
    url: `${baseURL}/selectYearComprehensiveEnergyConsumptionTopFive`
  })
}

// 根据能源类型查看本年度趋势图
export function loadEnergyTypeTrends (type) {
  return request({
    url: `${baseURL}/loadEnergyTypeTrends`,
    params: {
      type
    }
  })
}

// 某能源日折线数据
export function loadDayList (type) {
  return request({
    url: `${baseURL}/loadDayList`,
    params: {
      type,
    }
  })
}
// 某能源月折线数据
export function loadMonthList (type) {
  return request({
    url: `${baseURL}/loadMonthList`,
    params: {
      type,
    }
  })
}
// 某能源年状态数据 (一个数）loadYearList
export function loadYearList (type) {
  return request({
    url: `${baseURL}/loadYearList`,
    params: {
      type,
    }
  })
}

